package com.lwc.cfdns.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lwc.cfdns.pojo.BaseEntity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.lwc.cfdns.pojo.dto.ValidGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 后台通用分类
 *
 * @TableName cfdns_system_cate
 */
@TableName(value = "cfdns_system_cate")
@Data
public class SystemCate extends BaseEntity implements Serializable {
    /**
     * 用户ID
     */
    @TableId(type = IdType.AUTO)
    @NotNull(message = "ID不能为空", groups = {ValidGroup.Update.class})
    private Long id;

    /**
     * 类型（01配置分类）
     */
    private String type = "01";

    /**
     * 上级
     */
    private Long pid = 0l;

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空", groups = {ValidGroup.Create.class, ValidGroup.Update.class})
    private String name;

    /**
     * 显示顺序
     */
    private Integer sort;

    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}